﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<BusinessComponents.ReservationMaster>" %>
<%@ Import Namespace="BusinessComponents.Managers" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Make Reservation
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <script src="/Scripts/MicrosoftAjax.js"  type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcAjax.js" type="text/javascript"></script>
    <script src="/Scripts/MicrosoftMvcValidation.js" type="text/javascript"></script>

    <h2></h2>
    <% Html.EnableClientValidation(); %>

    <% using (Html.BeginForm("Create", "Reservation"))
       {%>
        <%: Html.ValidationSummary(true) %>

        <fieldset>
            <legend>Make Reservation</legend>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.TypeCode) %>
            </div>
            <div class="editor-field">
                <%: Html.DropDownListFor(model => model.TypeCode, 
                              new SelectList(
                                  ManagerFactory.RoomTypeMgr.FindAllRoomTypes(), 
                                  "TypeCode",
                                  "Description", 
                                  Model.TypeCode))  %>
                <%: Html.ValidationMessageFor(model => model.TypeCode) %>
            </div>
            
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.RoomCount) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.RoomCount) %>
                <%: Html.ValidationMessageFor(model => model.RoomCount) %>
            </div>
            
            <div class="editor-label">
                <%: Html.LabelFor(model => model.NoOfPax) %>
            </div>
            <div class="editor-field">
                <%: Html.TextBoxFor(model => model.NoOfPax) %>
                <%: Html.ValidationMessageFor(model => model.NoOfPax) %>
            </div>
            
            <p>
                <input type="submit" name="btnSubmit" value="Next" />
                <input type="submit" name="btnSubmit" value="Cancel" />
            </p>
        </fieldset>

    <% } %>

</asp:Content>

